Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adding 'Load this SAE' popup to docs table #362

Merged
merged 1 commit into from
Nov 9, 2024

Conversation

chanind
Copy link
Collaborator

@chanind chanind commented Nov 7, 2024

Description

I've noticed users sometimes get confused on the pretrained SAE table docs page about how to load a specific SAE in their code. This PR adds a "Load this SAE" link to each SAE in the pretrained SAEs table in docs. Clicking this link will pop up the code to load the specific SAE in SAELens, with a "Copy code" button to make it easy to copy into your own work.

Screenshot 2024-11-07 at 10 53 21 Screenshot 2024-11-07 at 10 53 37

The JS/CSS is a bit hacky but should do the job.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have not rewritten tests relating to key interfaces which would affect backward compatibility

# The below three make MathJax work, see https://squidfunk.github.io/mkdocs-material/reference/mathjax/
- javascript/mathjax.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These JS files don't exist and are erroring on load on the docs website, so just removing / commenting for now

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.14%. Comparing base (8e09458) to head (3e9fb62).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #362   +/-   ##
=======================================
  Coverage   66.14%   66.14%           
=======================================
  Files          25       25           
  Lines        3373     3373           
  Branches      432      432           
=======================================
  Hits         2231     2231           
  Misses       1021     1021           
  Partials      121      121           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chanind
Copy link
Collaborator Author

chanind commented Nov 9, 2024

discussed / approved offline

@chanind chanind merged commit 1866aa7 into main Nov 9, 2024
7 checks passed
@chanind chanind deleted the sae-table-load-helper branch November 9, 2024 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant